

Pod::Spec.new do |s|
  s.name             = "BCUIKit"
  s.version          = "1.0.0"
  s.summary          = "UI 基础库"
  s.description      = <<-DESC.gsub(/^\s*\|?/,'')
                       基础UI库

                       | * Markdown format.
                       | * Don't worry about the indent, we strip it!
                       DESC
  s.homepage         = "https://gitlab.leke.cn/health-huihui/app/ios/ios-component/BCUIKit.git"
  # s.screenshots     = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
  s.license          = 'BSD'
  s.author           = { "chasel" => "chenchun1@cnstrong.cn" }
  s.source           = { :git => "git@gitlab.leke.cn:health-huihui/app/ios/ios-component/BCUIKit.git", :branch => "master" }

  s.platform     = :ios, '8.0'
  s.requires_arc = true

  s.default_subspec = 'Core'
  
  # 核心库
  s.subspec 'Core' do |core|
    core.public_header_files = 'Core/**/*.h'
    core.source_files = 'Core/**/*.{h,m}'
    core.dependency 'BCComConfigKit'
    core.dependency 'BCFileLog'
    core.dependency 'BCFoundation'
   end

    #Controller
  s.subspec 'Controller' do |controller|
   controller.public_header_files = 'Controller/**/*.h'
   controller.source_files = 'Controller/**/*.{h,m}'
   
   controller.dependency s.name+'/Core'
  end
      #Controller
  s.subspec 'NoSController' do |controller|
   controller.public_header_files = 'Controller/**/*.h'
   controller.source_files = 'Controller/**/*.{h,m}'
   
   controller.dependency s.name+'/Core'
  end
  
  #Alert
  s.subspec 'Alert' do |alert|
   alert.public_header_files = 'Alert/**/*.h'
   alert.source_files = 'Alert/**/*.{h,m}'
   alert.dependency s.name+'/Core'
   alert.dependency s.name+'/Controller'
  end
  
  #Input
  s.subspec 'Input' do |input|
   input.public_header_files = 'Input/**/*.h'
   input.source_files = 'Input/**/*.{h,m}'
   input.dependency s.name+'/Core'
  end
   
   #ScrollView
   s.subspec 'ScrollView' do |scrollView|
    scrollView.public_header_files = 'ScrollView/**/*.h'
    scrollView.source_files = 'ScrollView/**/*.{h,m}'
    scrollView.dependency s.name+'/Core'
   end
   
   #TableView
   s.subspec 'TableView' do |tableView|
     tableView.public_header_files = 'TableView/**/*.h'
     tableView.source_files = 'TableView/**/*.{h,m}'
     tableView.dependency s.name+'/Core'
   end
   
   #Label
   s.subspec 'Label' do |label|
    label.public_header_files = 'Label/**/*.h'
    label.source_files = 'Label/**/*.{h,m}'
    label.dependency s.name+'/Core'
   end
   
   #Application
   s.subspec 'Application' do |appliation|
    appliation.public_header_files = 'Application/**/*.h'
    appliation.source_files = 'Application/**/*.{h,m}'
    appliation.dependency s.name+'/Core'
   end

   #截图
   s.subspec 'Screenshot' do |screenshot|
    screenshot.public_header_files = 'Screenshot/*.h'
    screenshot.source_files = 'Screenshot/*.{h,m}'
   end

   #app delegate模块
   s.subspec 'AppDelegate' do |app|
       app.public_header_files = 'AppDelegate/**/BCAppDelegate.h'
       app.source_files = 'AppDelegate/**/BCAppDelegate.*'
       app.dependency 'BCEventBus/Core'
       app.dependency 'BCFileLog'
   end
   
   #BaseViewController
     s.subspec 'BaseViewController' do |baseVCSwift|
         baseVCSwift.source_files = 'BaseViewController/**/*.*'
         
   end
   
   #app delegate swift模块
   s.subspec 'AppDelegate-Swift' do |appSwift|
       appSwift.source_files = 'AppDelegateSwift/**/BCSAppDelegate.*'
       appSwift.dependency s.name+'/Core'
       appSwift.dependency 'BCEventBus/CoreSwift'
       appSwift.dependency 'BCFileLog/CoreSwift'
   end
   #app delegate swift模块
   s.subspec 'SwiftAppDelegate' do |swiftApp|
     swiftApp.source_files = 'AppDelegateSwift/**/BCSAppDelegate.*'
     swiftApp.dependency s.name+'/Core'
     swiftApp.dependency 'BCEventBus/CoreSwift'
     swiftApp.dependency 'BCFileLog/CoreSwift'
   end
   
   #flutter模块
   s.subspec 'Flutter' do |flutter|
     flutter.dependency 'flutter_engine'
     flutter.dependency s.name+'/Core'
     flutter.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) ZHFLUTTER', 'SWIFT_ACTIVE_COMPILATION_CONDITIONS' => '$(inherited) ZHFLUTTER'}
   end

   # react native 核心库
   s.subspec 'ReactCore' do |reactCore|
     reactCore.public_header_files = 'ReactCore/**/*.h'
     reactCore.source_files = 'ReactCore/**/*.{swift,h,m,mm}'
     reactCore.dependency 'React'
#     reactCore.dependency 'BCComConfigKit'
#     reactCore.dependency 'BCFileLog'
#     reactCore.dependency 'BCFoundation'
    end

       #flutter模块
   s.subspec 'CoreSwift' do |swift|
    swift.source_files = 'CoreSwift/**/*.swift'
   end

end
